package fr.buildcity.jeu.ui;

import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.gui.AbstractComponent;
import org.newdawn.slick.gui.ComponentListener;
import org.newdawn.slick.gui.MouseOverArea;

public class ControlPanel extends AbstractUI implements ComponentListener {

	private MouseOverArea button;          

	public ControlPanel(GameContainer c, String name) throws SlickException {
		super(c, name);
		
		button = new MouseOverArea(c, new Image("res/heart.png"), 100, 100, this);  
		button.setNormalColor(new Color(0.7f, 0.7f, 0.7f, 1f));  
		button.setMouseOverColor(new Color(0.9f,0.9f,0.9f,1f));  
	}  

	@Override
	public void componentActivated(AbstractComponent source) {
		if(source.equals(button)) { 
			  // on clique sur "jouer" 
		}
	}

	@Override
	public void renderUI(GameContainer container, Graphics g) {
		button.render(container, g);
	}  

}
